home *** CD-ROM | disk | FTP | other *** search
- global gpSelectionWindow, gpVideoWindow
-
- on openSelectionMIAW theList, theTitle, theCallback
- set width to 294
- set height to 290
- if objectp(gpSelectionWindow) then
- forget(gpSelectionWindow)
- end if
- set gpSelectionWindow to window "MIAW.DIR"
- set dx to the stageLeft + ((the stageRight - the stageLeft - width) / 2)
- set dy to the stageTop + ((the stageBottom - the stageTop - height) / 2)
- set myRect to rect(dx, dy, dx + width, dy + height)
- set the rect of gpSelectionWindow to myRect
- set the title of gpSelectionWindow to EMPTY
- set the windowType of gpSelectionWindow to 5
- open(gpSelectionWindow)
- tell gpSelectionWindow
- doSelection(theList, theTitle, theCallback)
- end tell
- end
-
- on closeSelectionMIAW
- if objectp(gpSelectionWindow) then
- close(gpSelectionWindow)
- updateStage()
- forget(gpSelectionWindow)
- end if
- end
-
- on openVideoMIAW theFilename, theTitle
- set width to 286
- set height to 282
- if objectp(gpVideoWindow) then
- forget(gpVideoWindow)
- end if
- set gpVideoWindow to window "MIAW.DIR"
- set dx to the stageLeft + ((the stageRight - the stageLeft - width) / 2)
- set dy to the stageTop + ((the stageBottom - the stageTop - height) / 2)
- set myRect to rect(dx, dy, dx + width, dy + height)
- set the rect of gpVideoWindow to myRect
- set the title of gpVideoWindow to EMPTY
- set the windowType of gpVideoWindow to 1
- open(gpVideoWindow)
- tell gpVideoWindow
- doPlayVideo(theFilename, theTitle)
- end tell
- disableRandomSounds()
- end
-
- on closeVideoMIAW
- if objectp(gpVideoWindow) then
- close(gpVideoWindow)
- updateStage()
- forget(gpVideoWindow)
- enableRandomSounds()
- end if
- end
-
- on closeAllMIAWs
- closeSelectionMIAW()
- closeVideoMIAW()
- end
-